<?php
class Fender_Base_Autoloader extends Fender_Base_Behavior
{
	public function execute($params)
	{
		spl_autoload_register(array($this, "loader"));
		spl_autoload_extensions('.php');
	}

	public function loader($className)
	{
		if (class_exists($className, false) || interface_exists($className ,false)) {
			return true;
		}
		$file = str_replace('_', DS, $className) . '.php';
		require_once($file);
	}
}
